<UserControl x:Class="C4F.VistaP2P.WPF.MediaElementViewPort"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">       
        <Canvas Margin="0,0,0,0" Width="440" Height="330">
          
          <Viewport3D  Margin="10,-20,10,10" Width="400"  Height="370" Name="mainViewport" ClipToBounds="True" >
            <Viewport3D.Camera>
              <PerspectiveCamera
              FarPlaneDistance="100"
              LookDirection="0,0,-1"
              UpDirection="0,1,0"
              NearPlaneDistance="1"
              Position="0,0,7"
              FieldOfView="90" />
            </Viewport3D.Camera>
            <ModelVisual3D>
              <ModelVisual3D.Content>
                <AmbientLight Color="White"/>
              </ModelVisual3D.Content>
            </ModelVisual3D>
          </Viewport3D>

          <Label Margin="10,300,0,0"  Name="mBufferingVideo"></Label>
          
          <Slider Margin="410,20,0,0" Name="mSliderVertical" Value="10"  ValueChanged="OnSliderChangedVert" Orientation="Vertical"  Height="300"></Slider>

          <Slider  Margin="60,1,0,0" Name="mSliderHorizontal" Value="10"  ValueChanged="OnSliderChangedHorz" Orientation="Horizontal"  Width="300"></Slider>
          <!--LoadedBehavior="Manual"-->
          <MediaElement LoadedBehavior="Manual" MediaEnded="OnEndedVideo" BufferingStarted="OnBufferStartVideo" BufferingEnded="OnBufferEndVideo" MediaFailed="OnFailedVideo"  Margin="65,5,0,0"  Name="mVideoPlayer"   Width="1" Height="1"  Visibility="Visible">
          </MediaElement>
        </Canvas>            
</UserControl>
